import request from "@/utils/request"
import type { DriverLocationDTO } from "@/types/map";

/** 更新司机位置 */
export const updateDriverLocationAPI = (data: DriverLocationDTO) => {
  return request<null>({
    method: "PUT",
    url: "/map/location/driverLocation",
    data
  })
}

/** 删除司机位置 */
export const deleteDriverLocationAPI = (cityCode: string, driverId: number) => {
  return request<null>({
    method: "DELETE",
    url: `/map/location/driverLocation/${cityCode}/${driverId}`
  })
}
